package com.example.bookmanage.dao;

import com.example.bookmanage.pojo.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface BookDao {
    //查询所有的书籍
    List<Book> queryAllBook();
    List<Book> queryAllBookByTime(int page,int limit,@Param("time1") String time1,@Param("time2")String time2);
    //插入一张书籍
    boolean insertBook(Book book);
    //删除一张书籍 根据id来执行
    void delete(Integer id);
    //查询书籍的本书根据时间段进行查找
    int CountBookByTime(@Param(value = "time1") String time1, @Param(value = "time2") String time2);
    int CountAllBook();
    //根据书名查找是否存在改本书
    List<Book> queryBookByName(@Param(value = "bookName") String bookName);
    //跟新一本书籍操作
    boolean updateBook(Book book);
    //根据账号密码搜索用户信息

}
